# /usr/bin/python
# -*- coding: utf-8 -*-

import os,sys
BASE_DIR = os.path.dirname(os.path.abspath(os.curdir))
sys.path.append(BASE_DIR)
reload(sys)  
sys.setdefaultencoding('utf8')  
import re
from models.Zabbix import ZBX

Z = ZBX()
inter = Z.get_interface()

for i in inter:
    print "%s,%s"%(i['ip'],i['hosts'][0]['name'])

